<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<DecisionMaking.BusinessLogic.Model.ReportModel>" MasterPageFile="~/Views/Shared/Site.Master" %>
<%@ Import Namespace="DecisionMaking.WebApp.Charts" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="TitleContent">
    Algorithm Performance Comparison
</asp:Content>

<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <% using (Html.BeginForm("AlgorithmPerformanceComparison", "Reports", FormMethod.Get)) { %>
        <fieldset>
            <legend>Criteria</legend>
            <%=Html.Hidden("Execute", true) %>
            <p class="field-multi-line field-combo">
                <%= Html.LabelFor(m => m.EnvironmentId) %>
                <%= Html.DropDownListFor(m => m.EnvironmentId, new SelectList(Model.Environments, "Id", "Name"), "") %>
            </p>
            <p class="field-multi-line field-combo">
                <%= Html.LabelFor(m => m.SimulationId) %>
                <%= Html.DropDownListFor(m => m.SimulationId, new SelectList(Model.Simulations, "Id", "ExecutionDate"), "")%>
            </p>
            <p>
                <input type="submit" value="View" />
            </p>            
        </fieldset>
    <% } %>  
    <% if (ViewData["report"] != null) { %>
    <%=Html.FusionCharts().Line2D((int[])ViewData["categories"], (IEnumerable<DataSet<double>>)ViewData["dataSets"], 1024, 768, d => d)
        .XAxisLabel((string) ViewData["xAxisName"])
        .YAxisLabel((string) ViewData["yAxisName"])
        .YAxisMinValue(.5)%>
    <% } %>
</asp:Content>
